package com.rock.demo.sptest.designmodel.observe;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class EmailListener implements ApplicationListener<OrderObservable> {

    @Override
    @Async
    public void onApplicationEvent(OrderObservable event) {
        log.info(Thread.currentThread() + "mobile get:{}", event.getMessage());
    }
}
